/**一些docker相关的逻辑封装函数 */

import { createExec, startExec } from './docker'

//执行脚本
export const runScript = async (container_id: string, script_name: string) => {
  try {
    // 创建脚本命令
    const execId = await createExec(container_id, script_name)
    //执行脚本
    const startExecLog = await startExec(execId.Id)
    console.log(startExecLog)
  } catch (e) {
    console.log(e)
  }
}
